export function getParent(name, parent, type) {
  parent = parent.$parent;
  let parentName = parent.$options.name;
  while (parentName !== name) {
    parent = parent.$parent;
    if (!parent) return false
    parentName = parent.$options.name;
  }
  return parent;
}